﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class Class1
    {
        //1.定义一个用户类，存放用户的账号、用户名和密码属性；
        private string zh;
        private string name;
        private string password;

     
        public string Zh
        {
            get { return this.zh; }
            set { this.zh = value; }
        
        }

        public string Name
        {
            get { return this.name; }
            set { this.name = value; }

        }
        public string Password
        {
            get { return this.password; }
            set { this.password = value; }

        }
        public void sayhi()
        {
            Console.WriteLine("请输入账号");
           zh = Console.ReadLine();
            Console.WriteLine("请输入姓名");
            name = Console.ReadLine();
            Console.WriteLine("请输入密码");
            password = Console.ReadLine();

      Console.WriteLine("账号是{0}，姓名是{1}，密码是{2}",this.zh,this.name,this.password);
        }

    }
}
